vmx: Fix handling of FS/GS base MSRs.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 16 Jul 2009 09:26:55 +0000 (10:26 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 16 Jul 2009 09:26:55 +0000 (10:26 +0100)
commitb0ed77bd2f56b016e99e5347bf7fc904e68331f5
treeada836d12bc106e72aaaa622c90c76d1c7f72c64
parenta32e1cc8594196fd1ae99f0cf7a71889730f3106
vmx: Fix handling of FS/GS base MSRs.

Firstly, these MSRs are always accessible if the CPU supports them --
we should not check for EFER.LMA.

Secondly, we should not use teh cached value of shadow_gs while the
VCPU is running. It can be stale if the guest has executed SWAPGS
(which we cannot trap). Hence always access the underlying host MSR
when emulating guest accesses.

The latter bug was found and a patch proposed by <leonid@3tera.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vmx/vmx.c